{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1f6f6cad",
   "metadata": {},
   "outputs": [],
   "source": [
    "import jieba\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "06392454",
   "metadata": {},
   "outputs": [],
   "source": [
    "keyword_cn_df = pd.read_csv('../datasets/全部关键词_2次重写后补充.csv', encoding='utf-8-sig', header=0)\n",
    "qr1_cn_df = pd.read_csv('../datasets/1级查询词_淘宝搜索_查询扩充.csv', encoding='utf-8-sig', header=0)\n",
    "qr2_cn_df = pd.read_csv('../datasets/2级查询词_淘宝搜索_查询扩充.csv', encoding='utf-8-sig', header=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "7b81f597",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>query</th>\n",
       "      <th>rewrite_01</th>\n",
       "      <th>rewrite_02</th>\n",
       "      <th>rewrite_03</th>\n",
       "      <th>rewrite_04</th>\n",
       "      <th>rewrite_05</th>\n",
       "      <th>rewrite_06</th>\n",
       "      <th>rewrite_07</th>\n",
       "      <th>rewrite_08</th>\n",
       "      <th>rewrite_09</th>\n",
       "      <th>rewrite_10</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>01驱动器</td>\n",
       "      <td>假面骑士01驱动器</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>03echoo</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>055驱逐舰模型</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>05单兵饭盒</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0w一20全合成机油</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        query rewrite_01 rewrite_02 rewrite_03 rewrite_04 rewrite_05  \\\n",
       "0       01驱动器  假面骑士01驱动器        NaN        NaN        NaN        NaN   \n",
       "1     03echoo        NaN        NaN        NaN        NaN        NaN   \n",
       "2    055驱逐舰模型        NaN        NaN        NaN        NaN        NaN   \n",
       "3      05单兵饭盒        NaN        NaN        NaN        NaN        NaN   \n",
       "4  0w一20全合成机油        NaN        NaN        NaN        NaN        NaN   \n",
       "\n",
       "  rewrite_06 rewrite_07 rewrite_08 rewrite_09 rewrite_10  \n",
       "0        NaN        NaN        NaN        NaN        NaN  \n",
       "1        NaN        NaN        NaN        NaN        NaN  \n",
       "2        NaN        NaN        NaN        NaN        NaN  \n",
       "3        NaN        NaN        NaN        NaN        NaN  \n",
       "4        NaN        NaN        NaN        NaN        NaN  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qr1_cn_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "4cef6a88",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>query</th>\n",
       "      <th>rewrite_01</th>\n",
       "      <th>rewrite_02</th>\n",
       "      <th>rewrite_03</th>\n",
       "      <th>rewrite_04</th>\n",
       "      <th>rewrite_05</th>\n",
       "      <th>rewrite_06</th>\n",
       "      <th>rewrite_07</th>\n",
       "      <th>rewrite_08</th>\n",
       "      <th>rewrite_09</th>\n",
       "      <th>rewrite_10</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>假面骑士01驱动器</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0元购文具</td>\n",
       "      <td>0元购免费领取文具</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0元购免费领取手机</td>\n",
       "      <td>0元购免费领取盲盒手机</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0元购包邮</td>\n",
       "      <td>零元购0元包邮</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0元购免费</td>\n",
       "      <td>0元购免费领取</td>\n",
       "      <td>0元购免费领取盲盒手机</td>\n",
       "      <td>0元购免费领取零食</td>\n",
       "      <td>0元购免费领取手机</td>\n",
       "      <td>0元购免费领取蓝牙耳机</td>\n",
       "      <td>0元购免费领取文具</td>\n",
       "      <td>免单0元购免费领取</td>\n",
       "      <td>免单0元购免费立即领取零食</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       query   rewrite_01   rewrite_02 rewrite_03 rewrite_04   rewrite_05  \\\n",
       "0  假面骑士01驱动器          NaN          NaN        NaN        NaN          NaN   \n",
       "1      0元购文具    0元购免费领取文具          NaN        NaN        NaN          NaN   \n",
       "2  0元购免费领取手机  0元购免费领取盲盒手机          NaN        NaN        NaN          NaN   \n",
       "3      0元购包邮      零元购0元包邮          NaN        NaN        NaN          NaN   \n",
       "4      0元购免费      0元购免费领取  0元购免费领取盲盒手机  0元购免费领取零食  0元购免费领取手机  0元购免费领取蓝牙耳机   \n",
       "\n",
       "  rewrite_06 rewrite_07     rewrite_08 rewrite_09 rewrite_10  \n",
       "0        NaN        NaN            NaN        NaN        NaN  \n",
       "1        NaN        NaN            NaN        NaN        NaN  \n",
       "2        NaN        NaN            NaN        NaN        NaN  \n",
       "3        NaN        NaN            NaN        NaN        NaN  \n",
       "4  0元购免费领取文具  免单0元购免费领取  免单0元购免费立即领取零食        NaN        NaN  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qr2_cn_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "6ebda0e0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>10%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     0\n",
       "0   2%\n",
       "1   5%\n",
       "2   8%\n",
       "3  0.1\n",
       "4  10%"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "keyword_cn_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "f6965716",
   "metadata": {},
   "outputs": [],
   "source": [
    "qr1_cn_list = qr2_cn_df['query'].tolist()\n",
    "qr11_cn_list = qr1_cn_df['query'].tolist()\n",
    "keyword_list = keyword_cn_df['0'].tolist()\n",
    "qr2_cn_list = []\n",
    "qr2_segment_cn_list = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "ab197e41",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "166334"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(qr1_cn_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "d306d307",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "180648"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(qr11_cn_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "ad05302d",
   "metadata": {},
   "outputs": [],
   "source": [
    "qr1_cn_list = qr1_cn_list + qr11_cn_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a982a1a7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "346982"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(qr1_cn_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "fe336b38",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['2%', '5%', '8%', '0.1', '10%', '15%', '20%', '29%', '30%', '50%']"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "keyword_list[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "e86aabc7",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n",
      "Loading model from cache C:\\Users\\Alexpad\\AppData\\Local\\Temp\\jieba.cache\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1316 8 jew4room🍑\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Loading model cost 0.646 seconds.\n",
      "Prefix dict has been built successfully.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1316 8 🍑\n",
      "全球购6 0 abercrombie fitch\n",
      "2266 0 abercrombie\n",
      "2266 0  \n",
      "2266 0 fitch\n",
      "2266 0 \n",
      "2483 7 addidas 相关店铺\n",
      "2483 7  \n",
      "全球购7 0 af\n",
      "2587 0 af\n",
      "2587 0 \n",
      "全球购1 0 alexander mcqueen\n",
      "3001 0 alexander\n",
      "3001 0  \n",
      "3001 0 mcqueen\n",
      "3001 0 \n",
      "全球购2 0 alexander wang\n",
      "3002 0 alexander\n",
      "3002 0  \n",
      "3002 0 wang\n",
      "3002 0 \n",
      "全球购2 0 american eagle\n",
      "3162 0 american\n",
      "3162 0  \n",
      "3162 0 eagle\n",
      "3162 0 \n",
      "全球购7 0 asos\n",
      "3707 0 asos\n",
      "3707 0 \n",
      "3707 1 asos 相关店铺\n",
      "3707 1 asos\n",
      "3707 1  \n",
      "3946 0 aza旗舰店 相关店铺\n",
      "3946 0 aza\n",
      "3946 0  \n",
      "全球购8 0 balenciaga\n",
      "4108 0 balenciaga\n",
      "4108 0 \n",
      "全球购5 0 bally\n",
      "4125 0 bally\n",
      "4125 0 \n",
      "4195 4 basic house 相关店铺\n",
      "4195 4 basic\n",
      "4195 4  \n",
      "4195 4  \n",
      "全球购5 0 bcbg\n",
      "4295 0 \n",
      "4480 3 benefit 相关店铺\n",
      "4480 3 benefit\n",
      "4480 3  \n",
      "4487 3 benefit 相关店铺\n",
      "4487 3 benefit\n",
      "4487 3  \n",
      "全球购3 0 bottega veneta\n",
      "5003 0 bottega\n",
      "5003 0  \n",
      "5003 0 veneta\n",
      "5003 0 \n",
      "全球购7 0 burberry\n",
      "5207 0 burberry\n",
      "5207 0 \n",
      "全球购3 0 bvlgari\n",
      "5253 0 bvlgari\n",
      "5253 0 \n",
      "5719 9 ccdd 相关店铺\n",
      "5719 9  \n",
      "5746 3 cc家 相关店铺\n",
      "5746 3 cc\n",
      "5746 3  \n",
      "全球购4 0 celine\n",
      "5834 0 \n",
      "全球购0 0 chanel\n",
      "5980 0 chanel\n",
      "5980 0 \n",
      "6232 1 cicishop 相关店铺\n",
      "6232 1  \n",
      "全球购3 0 clinique\n",
      "6413 0 clinique\n",
      "6413 0 \n",
      "全球购1 0 coach\n",
      "6491 0 coach\n",
      "6491 0 \n",
      "全球购8 0 coach\n",
      "6528 0 coach\n",
      "6528 0 \n",
      "6620 0 🍑color tag\n",
      "6620 0 🍑\n",
      "6620 0  \n",
      "6620 0 tag\n",
      "6744 1 👜corah krion定制女包\n",
      "6744 1 👜\n",
      "6744 1  \n",
      "6745 0 👜corah krion定制女包\n",
      "6745 0 👜\n",
      "6745 0  \n",
      "7199 0 d2c 相关店铺\n",
      "7199 0  \n",
      "7373 0 dear栗 相关店铺\n",
      "7373 0 dear\n",
      "7373 0  \n",
      "7407 0 deesse 相关店铺\n",
      "7407 0 deesse\n",
      "7407 0  \n",
      "全球购5 0 dior\n",
      "7605 0 dior\n",
      "7605 0 \n",
      "全球购3 0 dior\n",
      "7613 0 dior\n",
      "7613 0 \n",
      "7738 2 dmc十字绣 相关店铺\n",
      "7738 2 dmc\n",
      "7738 2  \n",
      "8184 1 🔗dxtoxs\n",
      "8184 1 🔗\n",
      "8589 4 enjoyit🍑\n",
      "8589 4 🍑\n",
      "8590 2 enjoyit🍑\n",
      "8590 2 🍑\n",
      "8710 3 esprit 相关店铺\n",
      "8710 3 esprit\n",
      "8710 3  \n",
      "全球购8 0 estee lauder\n",
      "8738 0 estee\n",
      "8738 0  \n",
      "8738 0 lauder\n",
      "8738 0 \n",
      "8748 0 etam 相关店铺\n",
      "8748 0 etam\n",
      "8748 0  \n",
      "8908 0 ez14 相关店铺\n",
      "8908 0  \n",
      "9519 0 forever21 相关店铺\n",
      "9519 0  \n",
      "10411 0 gracegift 相关店铺\n",
      "10411 0  \n",
      "全球购91 0 gucci\n",
      "10591 0 gucci\n",
      "10591 0 \n",
      "全球购09 0 guess\n",
      "10609 0 guess\n",
      "10609 0 \n",
      "10985 7 hera 相关店铺\n",
      "10985 7 hera\n",
      "10985 7  \n",
      "全球购14 0 hermes\n",
      "11014 0 hermes\n",
      "11014 0 \n",
      "全球购81 0 hm\n",
      "11181 0 hm\n",
      "11181 0 \n",
      "11181 8 hm 相关店铺\n",
      "11181 8 hm\n",
      "11181 8  \n",
      "11292 2 honeys 相关店铺\n",
      "11292 2 honeys\n",
      "11292 2  \n",
      "11356 8 hotwind 相关店铺\n",
      "11356 8 hotwind\n",
      "11356 8  \n",
      "11455 0 htc手机 相关店铺\n",
      "11455 0 htc\n",
      "11455 0  \n",
      "11892 6 innisfree 相关店铺\n",
      "11892 6  \n",
      "11922 0 🍑 instahot\n",
      "11922 0 🍑\n",
      "11922 0  \n",
      "11922 0 instahot\n",
      "12301 5 izzue 相关店铺\n",
      "12301 5  \n",
      "12326 7 jackjones 相关店铺\n",
      "12326 7  \n",
      "12367 7 jansport 相关店铺\n",
      "12367 7 jansport\n",
      "12367 7  \n",
      "12386 1 jasonwood 相关店铺\n",
      "12386 1  \n",
      "12551 6 jew4room🍑\n",
      "12551 6 🍑\n",
      "全球购75 0 jimmy choo\n",
      "12575 0 jimmy\n",
      "12575 0  \n",
      "12575 0 choo\n",
      "12575 0 \n",
      "12773 2 jollight👔\n",
      "12773 2 👔\n",
      "13118 1 kappa官方旗舰店 相关店铺\n",
      "13118 1 kappa\n",
      "13118 1  \n",
      "全球购31 0 karicare\n",
      "13131 0 karicare\n",
      "13131 0 \n",
      "全球购42 0 kate spade\n",
      "13142 0 kate\n",
      "13142 0  \n",
      "13142 0 spade\n",
      "13142 0 \n",
      "13402 9 kisscat 相关店铺\n",
      "13402 9  \n",
      "13443 0 kizzme 相关店铺\n",
      "13443 0  \n",
      "全球购71 0 lancome\n",
      "13871 0 lancome\n",
      "13871 0 \n",
      "全球购76 0 laneige\n",
      "13876 0 laneige\n",
      "13876 0 \n",
      "14105 7 lego 相关店铺\n",
      "14105 7 lego\n",
      "14105 7  \n",
      "14160 3 lesportsac 相关店铺\n",
      "14160 3 lesportsac\n",
      "14160 3  \n",
      "全球购23 0 louis vuitton\n",
      "14623 0 louis\n",
      "14623 0  \n",
      "14623 0 vuitton\n",
      "14623 0 \n",
      "全球购20 0 lv\n",
      "14820 0 \n",
      "15166 6 🔍maputi护手霜\n",
      "15166 6 🔍\n",
      "15166 7 🔍maputi止汗露\n",
      "15166 7 🔍\n",
      "15168 0 🔍maputi止汗露\n",
      "15168 0 🔍\n",
      "15411 1 mbox 相关店铺\n",
      "15411 1  \n",
      "15660 0 mg面膜 相关店铺\n",
      "15660 0 mg\n",
      "15660 0  \n",
      "16307 1 🍑mossyard满满\n",
      "16307 1 🍑\n",
      "16308 0 🍑mossyard满满\n",
      "16308 0 🍑\n",
      "16363 4 moveup 相关店铺\n",
      "16363 4 moveup\n",
      "16363 4  \n",
      "16496 7 msshe 相关店铺\n",
      "16496 7  \n",
      "17160 0 nice claup 相关店铺\n",
      "17160 0  \n",
      "17160 0 claup\n",
      "17160 0  \n",
      "17358 1 nokia 相关店铺\n",
      "17358 1 nokia\n",
      "17358 1  \n",
      "17531 3 npc 相关店铺\n",
      "17531 3  \n",
      "17667 9 华为nzones7pro➕手机壳\n",
      "17667 9 ➕\n",
      "17670 5 华为nzones7pro➕手机壳\n",
      "17670 5 ➕\n",
      "17671 3 华为nzones7pro➕手机壳\n",
      "17671 3 ➕\n",
      "17674 4 华为nzones7pro➕手机壳\n",
      "17674 4 ➕\n",
      "17969 0 olive des olive 相关店铺\n",
      "17969 0 olive\n",
      "17969 0  \n",
      "17969 0 des\n",
      "17969 0  \n",
      "17969 0 olive\n",
      "17969 0  \n",
      "18085 2 only代购 相关店铺\n",
      "18085 2 only\n",
      "18085 2  \n",
      "18288 6 osa 相关店铺\n",
      "18288 6 osa\n",
      "18288 6  \n",
      "18295 0 osa品牌服饰旗舰店 相关店铺\n",
      "18295 0 osa\n",
      "18295 0  \n",
      "18336 2 othermix 相关店铺\n",
      "18336 2 othermix\n",
      "18336 2  \n",
      "18582 0 partysu 相关店铺\n",
      "18582 0 partysu\n",
      "18582 0  \n",
      "19048 7 plory 相关店铺\n",
      "19048 7  \n",
      "全球购86 0 prada\n",
      "19286 0 prada\n",
      "19286 0 \n",
      "19523 1 pureracepr🔵\n",
      "19523 1 🔵\n",
      "19772 0 queenshop 相关店铺\n",
      "19772 0  \n",
      "全球购88 0 ralph lauren\n",
      "19888 0 ralph\n",
      "19888 0  \n",
      "19888 0 lauren\n",
      "19888 0 \n",
      "20034 4 redmik40pro➕手机壳\n",
      "20034 4 ➕\n",
      "全球购36 0 rolex\n",
      "20436 0 rolex\n",
      "20436 0 \n",
      "20950 1 secretworld🍑\n",
      "20950 1 🍑\n",
      "20995 8 selected 相关店铺\n",
      "20995 8 selected\n",
      "20995 8  \n",
      "21017 2 semir 相关店铺\n",
      "21017 2 semir\n",
      "21017 2  \n",
      "全球购25 0 senshukai\n",
      "21025 0 senshukai\n",
      "21025 0 \n",
      "21084 7 sgirl 相关店铺\n",
      "21084 7  \n",
      "21295 0 skinfood 相关店铺\n",
      "21295 0  \n",
      "21323 2 🍑skylercase的壳子店\n",
      "21323 2 🍑\n",
      "21324 0 🍑skylercase的壳子店\n",
      "21324 0 🍑\n",
      "21739 8 speedo 相关店铺\n",
      "21739 8 speedo\n",
      "21739 8  \n",
      "21949 1 stayreal 相关店铺\n",
      "21949 1 stayreal\n",
      "21949 1  \n",
      "22109 7 stylenanda 相关店铺\n",
      "22109 7  \n",
      "22422 5 🍑s家2021春夏新品优雅泡泡袖针织背心连衣裙两件套女\n",
      "22422 5 🍑\n",
      "全球购91 0 timberland\n",
      "22991 0 timberland\n",
      "22991 0 \n",
      "23043 1 tkstyle 相关店铺\n",
      "23043 1  \n",
      "23230 1 topshop 相关店铺\n",
      "23230 1 topshop\n",
      "23230 1  \n",
      "全球购85 0 ugg\n",
      "23685 0 ugg\n",
      "23685 0 \n",
      "全球购16 0 valentino\n",
      "24116 0 \n",
      "24206 2 vcruan 相关店铺\n",
      "24206 2  \n",
      "25192 2 wwe 相关店铺\n",
      "25192 2 wwe\n",
      "25192 2  \n",
      "全球购88 0 ysl\n",
      "25588 0 ysl\n",
      "25588 0 \n",
      "25662 4 zakka 相关店铺\n",
      "25662 4  \n",
      "26067 0 阿朵丽兹 相关店铺\n",
      "26067 0  \n",
      "26132 5 阿芙精油 相关店铺\n",
      "26132 5  \n",
      "26578 1 阿依莲官方旗舰店 相关店铺\n",
      "26578 1  \n",
      "26581 5 阿依莲旗舰店 相关店铺\n",
      "26581 5  \n",
      "26846 1 艾格官方旗舰店 相关店铺\n",
      "26846 1  \n",
      "27215 0 爱爱丸 相关店铺\n",
      "27215 0  \n",
      "27265 9 爱得利 相关店铺\n",
      "27265 9  \n",
      "27384 6 爱华仕 相关店铺\n",
      "27384 6  \n",
      "全球购14 0 爱马仕\n",
      "27514 0 \n",
      "27549 9 爱美丽 相关店铺\n",
      "27549 9  \n",
      "28161 7 安娜苏 相关店铺\n",
      "28161 7  \n",
      "28884 5 傲丝度 相关店铺\n",
      "28884 5  \n",
      "28899 4 奥比岛 相关店铺\n",
      "28899 4  \n",
      "29361 9 澳贝 相关店铺\n",
      "29361 9  \n",
      "29691 4 巴巴爸爸 相关店铺\n",
      "29691 4  \n",
      "全球购31 0 巴黎世家\n",
      "29831 0 \n",
      "30098 9 芭依璐 相关店铺\n",
      "30098 9  \n",
      "30280 1 霸王龙🦖\n",
      "30280 1 🦖\n",
      "全球购39 0 百达翡丽\n",
      "30939 0 \n",
      "30983 0 百分之一 相关店铺\n",
      "30983 0  \n",
      "31425 1 佰草集官方旗舰店 相关店铺\n",
      "31425 1  \n",
      "31465 3 柏卡姿 相关店铺\n",
      "31465 3  \n",
      "31649 8 班尼路旗舰店 相关店铺\n",
      "31649 8  \n",
      "32696 4 宝洁 相关店铺\n",
      "32696 4  \n",
      "33797 3 贝贝怡 相关店铺\n",
      "33797 3  \n",
      "33840 2 贝多芬 相关店铺\n",
      "33840 2  \n",
      "33994 2 贝亲官方旗舰店 相关店铺\n",
      "33994 2  \n",
      "34692 0 比度克 相关店铺\n",
      "34692 0  \n",
      "34826 5 彼得兔 相关店铺\n",
      "34826 5  \n",
      "35785 0 表面咒语 相关店铺\n",
      "35785 0  \n",
      "36432 3 波奇 相关店铺\n",
      "36432 3  \n",
      "36760 2 播官方旗舰店 相关店铺\n",
      "36760 2  \n",
      "36843 0 帛逸 相关店铺\n",
      "36843 0  \n",
      "37805 2 布朗博士 相关店铺\n",
      "37805 2  \n",
      "37941 2 布衣传说 相关店铺\n",
      "37941 2  \n",
      "38017 1 步履不停 相关店铺\n",
      "38017 1  \n",
      "39960 0 婵真 相关店铺\n",
      "39960 0  \n",
      "40659 6 潮流前线 相关店铺\n",
      "40659 6  \n",
      "40660 3 潮流前线官方旗舰店 相关店铺\n",
      "40660 3  \n",
      "42246 0 宠爱无名 相关店铺\n",
      "42246 0  \n",
      "42702 7 初语 相关店铺\n",
      "42702 7  \n",
      "43937 2 创世纪 相关店铺\n",
      "43937 2  \n",
      "44194 2 🍑s家2021春夏新品优雅泡泡袖针织背心连衣裙两件套女\n",
      "44194 2 🍑\n",
      "45319 9 达芙妮官方旗舰店 相关店铺\n",
      "45319 9  \n",
      "46243 1 大韩泡泡糖 相关店铺\n",
      "46243 1  \n",
      "全球购20 0 大嘴猴\n",
      "47520 0 \n",
      "全球购87 0 代购\n",
      "47587 0 \n",
      "48564 2 蛋挞家 相关店铺\n",
      "48564 2  \n",
      "49268 2 德尔惠官方旗舰店 相关店铺\n",
      "49268 2  \n",
      "49599 1 德州巴黎 相关店铺\n",
      "49599 1  \n",
      "全球购83 0 迪奥\n",
      "50483 0 \n",
      "50759 6 笛莎旗舰店 相关店铺\n",
      "50759 6  \n",
      "50934 1 第七公社 相关店铺\n",
      "50934 1  \n",
      "50961 1 第五大道 相关店铺\n",
      "50961 1  \n",
      "52470 0 电玩巴士 相关店铺\n",
      "52470 0  \n",
      "52472 0 电玩男 相关店铺\n",
      "52472 0  \n",
      "54621 2 斗战胜佛 相关店铺\n",
      "54621 2  \n",
      "54913 1 读库 相关店铺\n",
      "54913 1  \n",
      "55598 3 多多家 相关店铺\n",
      "55598 3  \n",
      "55690 5 多乐士 相关店铺\n",
      "55690 5  \n",
      "55884 4 多样屋 相关店铺\n",
      "55884 4  \n",
      "56299 2 恩雅 相关店铺\n",
      "56299 2  \n",
      "57596 6 法恩莎 相关店铺\n",
      "57596 6  \n",
      "57843 0 番茄小铺子 相关店铺\n",
      "57843 0  \n",
      "57976 1 凡客诚品 相关店铺\n",
      "57976 1  \n",
      "58015 6 凡兔 相关店铺\n",
      "58015 6  \n",
      "58258 1 👜泛本funben\n",
      "58258 1 👜\n",
      "58260 6 泛泛 相关店铺\n",
      "58260 6  \n",
      "58303 9 范思蓝恩 相关店铺\n",
      "58303 9  \n",
      "58344 4 范特西 相关店铺\n",
      "58344 4  \n",
      "全球购90 0 菲拉格慕\n",
      "59790 0 \n",
      "60090 7 费雪 相关店铺\n",
      "60090 7  \n",
      "60359 3 粉红豹 相关店铺\n",
      "60359 3  \n",
      "64408 6 歌瑞尔 相关店铺\n",
      "64408 6  \n",
      "65244 4 公交车🚌\n",
      "65244 4 🚌\n",
      "65854 0 咕噜家 相关店铺\n",
      "65854 0  \n",
      "65860 0 咕噜喔 相关店铺\n",
      "65860 0  \n",
      "全球购12 0 古琦\n",
      "66112 0 \n",
      "66195 1 古由卡 相关店铺\n",
      "66195 1  \n",
      "68821 0 哈果超人 相关店铺\n",
      "68821 0  \n",
      "69073 1 还不晚 相关店铺\n",
      "69073 1  \n",
      "全球购26 0 海蓝之谜\n",
      "69426 0 \n",
      "70025 7 韩都衣舍旗舰店 相关店铺\n",
      "70025 7  \n",
      "70102 0 韩裳良品 相关店铺\n",
      "70102 0  \n",
      "70156 1 韩衣都舍 相关店铺\n",
      "70156 1  \n",
      "70764 5 🍑好奇蜜斯旗舰店\n",
      "70764 5 🍑\n",
      "70768 0 🍑好奇蜜斯旗舰店\n",
      "70768 0 🍑\n",
      "72154 7 亨氏 相关店铺\n",
      "72154 7  \n",
      "72580 0 红果果 相关店铺\n",
      "72580 0  \n",
      "72853 9 红蜻蜓旗舰店 相关店铺\n",
      "72853 9  \n",
      "72867 3 红人馆 相关店铺\n",
      "72867 3  \n",
      "73248 4 虹越 相关店铺\n",
      "73248 4  \n",
      "74948 2 花田橱窗 相关店铺\n",
      "74948 2  \n",
      "75039 0 花样年华 相关店铺\n",
      "75039 0  \n",
      "全球购68 0 华伦天奴\n",
      "75268 0 \n",
      "77060 0 汇美舍 相关店铺\n",
      "77060 0  \n",
      "79390 1 季候风官方旗舰店 相关店铺\n",
      "79390 1  \n",
      "80283 0 家有猪鼻 相关店铺\n",
      "80283 0  \n",
      "80829 1 坚持我的 相关店铺\n",
      "80829 1  \n",
      "81367 9 健将 相关店铺\n",
      "81367 9  \n",
      "81573 4 箭牌卫浴 相关店铺\n",
      "81573 4  \n",
      "全球购37 0 江诗丹顿\n",
      "81637 0 \n",
      "81815 7 奖杯🏆\n",
      "81815 7 🏆\n",
      "83679 1 金大班 相关店铺\n",
      "83679 1  \n",
      "83776 0 金粉世家 相关店铺\n",
      "83776 0  \n",
      "84055 7 金利来女包 相关店铺\n",
      "84055 7  \n",
      "84281 4 金士顿官方旗舰店 相关店铺\n",
      "84281 4  \n",
      "84550 1 金苑旗舰店 相关店铺\n",
      "84550 1  \n",
      "全球购32 0 进口\n",
      "84832 0 \n",
      "84923 8 劲霸官方旗舰店 相关店铺\n",
      "84923 8  \n",
      "85051 9 京润珍珠 相关店铺\n",
      "85051 9  \n",
      "85188 6 晶咕 相关店铺\n",
      "85188 6  \n",
      "85943 4 九牧王官方旗舰店 相关店铺\n",
      "85943 4  \n",
      "85983 2 九色生活 相关店铺\n",
      "85983 2  \n",
      "86096 1 久爱 相关店铺\n",
      "86096 1  \n",
      "86344 3 救护车🚑\n",
      "86344 3 🚑\n",
      "86580 0 橘子郡 相关店铺\n",
      "86580 0  \n",
      "86787 7 聚利时 相关店铺\n",
      "86787 7  \n",
      "87062 0 爵士小强 相关店铺\n",
      "87062 0  \n",
      "87743 4 卡洛驰 相关店铺\n",
      "87743 4  \n",
      "87760 6 卡玛 相关店铺\n",
      "87760 6  \n",
      "87763 0 卡玛 相关店铺\n",
      "87763 0  \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "87830 8 卡尼尔 相关店铺\n",
      "87830 8  \n",
      "88900 4 康龙 相关店铺\n",
      "88900 4  \n",
      "89782 7 蝌蚪 相关店铺\n",
      "89782 7  \n",
      "全球购76 0 可瑞康\n",
      "90076 0 \n",
      "91093 9 口罩一次性医疗口罩中国🇨🇳\n",
      "91093 9 🇨\n",
      "91093 9 🇳\n",
      "91123 2 扣针🧷\n",
      "91123 2 🧷\n",
      "全球购41 0 蔻驰\n",
      "91141 0 \n",
      "91497 0 酷衣购 相关店铺\n",
      "91497 0  \n",
      "91635 0 快乐123 相关店铺\n",
      "91635 0  \n",
      "91791 4 匡威官方旗舰店 相关店铺\n",
      "91791 4  \n",
      "92727 8 来伊份 相关店铺\n",
      "92727 8  \n",
      "92729 1 来伊份官方旗舰店 相关店铺\n",
      "92729 1  \n",
      "全球购31 0 兰蔻\n",
      "92931 0 \n",
      "全球购12 0 兰芝\n",
      "93012 0 \n",
      "93290 1 蓝色倾情 相关店铺\n",
      "93290 1  \n",
      "93778 0 浪漫一身 相关店铺\n",
      "93778 0  \n",
      "全球购71 0 劳力士\n",
      "93871 0 \n",
      "94098 5 老金磨坊 相关店铺\n",
      "94098 5  \n",
      "94407 0 老园丁 相关店铺\n",
      "94407 0  \n",
      "94497 9 乐町官方旗舰店 相关店铺\n",
      "94497 9  \n",
      "94517 7 🍑乐凡闪光面膜\n",
      "94517 7 🍑\n",
      "94522 1 🍑乐凡闪光面膜\n",
      "94522 1 🍑\n",
      "94776 8 乐途 相关店铺\n",
      "94776 8  \n",
      "95586 0 李大米 相关店铺\n",
      "95586 0  \n",
      "95823 6 里美 相关店铺\n",
      "95823 6  \n",
      "全球购71 0 理肤泉\n",
      "95871 0 \n",
      "96235 5 丽婴房 相关店铺\n",
      "96235 5  \n",
      "96467 9 莉贝琳 相关店铺\n",
      "96467 9  \n",
      "96754 1 联合利华 相关店铺\n",
      "96754 1  \n",
      "97193 3 两三事 相关店铺\n",
      "97193 3  \n",
      "97336 2 🔍不锈钢衣架多功能袜子内衣多夹子衣柜婴儿学生宿舍晾晒神器\n",
      "97336 2 🔍\n",
      "97339 3 🔍不锈钢衣架多功能袜子内衣多夹子衣柜婴儿学生宿舍晾晒神器\n",
      "97339 3 🔍\n",
      "97344 0 🔍不锈钢衣架多功能袜子内衣多夹子衣柜婴儿学生宿舍晾晒神器\n",
      "97344 0 🔍\n",
      "97500 7 裂帛 相关店铺\n",
      "97500 7  \n",
      "97506 4 裂帛旗舰店 相关店铺\n",
      "97506 4  \n",
      "97524 7 邻家女孩 相关店铺\n",
      "97524 7  \n",
      "97526 3 邻家女孩旗舰店 相关店铺\n",
      "97526 3  \n",
      "97554 3 林家铺子 相关店铺\n",
      "97554 3  \n",
      "98462 0 六本木 相关店铺\n",
      "98462 0  \n",
      "99020 1 楼兰蜜语 相关店铺\n",
      "99020 1  \n",
      "99142 1 卢旺达的鱼 相关店铺\n",
      "99142 1  \n",
      "100106 0 罗密欧与朱丽叶 相关店铺\n",
      "100106 0  \n",
      "100346 8 洛可可 相关店铺\n",
      "100346 8  \n",
      "100896 4 绿野仙踪 相关店铺\n",
      "100896 4  \n",
      "102360 2 麦诺伊 相关店铺\n",
      "102360 2  \n",
      "102445 2 麦子熟了 相关店铺\n",
      "102445 2  \n",
      "102704 4 曼秀雷敦旗舰店 相关店铺\n",
      "102704 4  \n",
      "103900 2 美邦官方旗舰店 相关店铺\n",
      "103900 2  \n",
      "103901 3 美邦旗舰店 相关店铺\n",
      "103901 3  \n",
      "104203 2 美即面膜 相关店铺\n",
      "104203 2  \n",
      "104344 0 美丽加芬 相关店铺\n",
      "104344 0  \n",
      "104473 0 美女的大衣柜 相关店铺\n",
      "104473 0  \n",
      "104663 2 美特斯邦威官方网店 相关店铺\n",
      "104663 2  \n",
      "104678 1 美体小铺 相关店铺\n",
      "104678 1  \n",
      "104759 2 美伢 相关店铺\n",
      "104759 2  \n",
      "105254 9 蒙娜丽莎 相关店铺\n",
      "105254 9  \n",
      "105258 2 蒙娜丽莎女包 相关店铺\n",
      "105258 2  \n",
      "105261 3 蒙娜丽莎十字绣 相关店铺\n",
      "105261 3  \n",
      "105458 2 梦梦家 相关店铺\n",
      "105458 2  \n",
      "105545 1 咪咪发发 相关店铺\n",
      "105545 1  \n",
      "105947 1 米兰宣言 相关店铺\n",
      "105947 1  \n",
      "105992 3 米娜 相关店铺\n",
      "105992 3  \n",
      "106173 1 秘密盒子 相关店铺\n",
      "106173 1  \n",
      "106354 9 蜜丝佛陀 相关店铺\n",
      "106354 9  \n",
      "106575 1 棉立方 相关店铺\n",
      "106575 1  \n",
      "107090 9 妙丽 相关店铺\n",
      "107090 9  \n",
      "107123 3 咩咩家 相关店铺\n",
      "107123 3  \n",
      "107367 1 名门新娘 相关店铺\n",
      "107367 1  \n",
      "107662 1 铭都 相关店铺\n",
      "107662 1  \n",
      "107771 0 模玩地带 相关店铺\n",
      "107771 0  \n",
      "107871 5 摩恩 相关店铺\n",
      "107871 5  \n",
      "108451 0 魔衣宝贝 相关店铺\n",
      "108451 0  \n",
      "108559 0 茉莉清茶 相关店铺\n",
      "108559 0  \n",
      "108584 2 沫润面膜🍑\n",
      "108584 2 🍑\n",
      "108585 0 沫润面膜🍑\n",
      "108585 0 🍑\n",
      "108822 2 默默爱 相关店铺\n",
      "108822 2  \n",
      "全球购835 0 缪缪\n",
      "108835 0 \n",
      "108999 0 木村井泓 相关店铺\n",
      "108999 0  \n",
      "109100 3 木果果木 相关店铺\n",
      "109100 3  \n",
      "109198 1 木木家 相关店铺\n",
      "109198 1  \n",
      "109201 0 木木三 相关店铺\n",
      "109201 0  \n",
      "109418 5 木子李 相关店铺\n",
      "109418 5  \n",
      "109767 9 纳薇 相关店铺\n",
      "109767 9  \n",
      "109778 4 纳纹 相关店铺\n",
      "109778 4  \n",
      "111414 3 你好卡农 相关店铺\n",
      "111414 3  \n",
      "111824 0 宁夏满衣间1号店 相关店铺\n",
      "111824 0  \n",
      "111842 9 柠檬树 相关店铺\n",
      "111842 9  \n",
      "111876 8 妞妞 相关店铺\n",
      "111876 8  \n",
      "111926 3 牛尔 相关店铺\n",
      "111926 3  \n",
      "112728 3 诺曼琦 相关店铺\n",
      "112728 3  \n",
      "113454 5 欧迪芬 相关店铺\n",
      "113454 5  \n",
      "113787 8 欧莎 相关店铺\n",
      "113787 8  \n",
      "113793 7 欧莎旗舰店 相关店铺\n",
      "113793 7  \n",
      "113820 3 欧时力代购 相关店铺\n",
      "113820 3  \n",
      "114684 1 螃蟹秘密 相关店铺\n",
      "114684 1  \n",
      "115590 6 织云外贸 女装批发🍑\n",
      "115590 6  \n",
      "115590 6 🍑\n",
      "116231 0 飘零大叔 相关店铺\n",
      "116231 0  \n",
      "116313 0 漂流木 相关店铺\n",
      "116313 0  \n",
      "116988 4 泊美 相关店铺\n",
      "116988 4  \n",
      "全球购327 0 普拉达\n",
      "117327 0 \n",
      "117561 2 七公主 相关店铺\n",
      "117561 2  \n",
      "117640 2 七七之缘 相关店铺\n",
      "117640 2  \n",
      "117663 0 七色花 相关店铺\n",
      "117663 0  \n",
      "117746 7 柒牌官方旗舰店 相关店铺\n",
      "117746 7  \n",
      "118938 3 契尔氏 相关店铺\n",
      "118938 3  \n",
      "118988 3 千百惠 相关店铺\n",
      "118988 3  \n",
      "全球购124 0 千趣会\n",
      "119124 0 \n",
      "119186 3 千纤草 相关店铺\n",
      "119186 3  \n",
      "119207 6 千与千寻 相关店铺\n",
      "119207 6  \n",
      "119660 0 茜茜公主 相关店铺\n",
      "119660 0  \n",
      "全球购673 0 倩碧\n",
      "119673 0 \n",
      "全球购674 0 倩碧\n",
      "119674 0 \n",
      "119708 1 呛口小辣椒 相关店铺\n",
      "119708 1  \n",
      "120155 0 俏俏家居 相关店铺\n",
      "120155 0  \n",
      "120355 1 亲和素 相关店铺\n",
      "120355 1  \n",
      "120879 0 轻松熊 相关店铺\n",
      "120879 0  \n",
      "121567 7 秋水伊人官方旗舰店 相关店铺\n",
      "121567 7  \n",
      "121598 3 秋叶原 相关店铺\n",
      "121598 3  \n",
      "121881 5 屈臣氏官方旗舰店 相关店铺\n",
      "121881 5  \n",
      "122455 4 全友家私 相关店铺\n",
      "122455 4  \n",
      "123677 1 日康 相关店铺\n",
      "123677 1  \n",
      "124327 0 如梦霓裳 相关店铺\n",
      "124327 0  \n",
      "125189 4 润微 相关店铺\n",
      "125189 4  \n",
      "125255 2 撒哈拉 相关店铺\n",
      "125255 2  \n",
      "125567 7 三彩官方旗舰店 相关店铺\n",
      "125567 7  \n",
      "126204 0 三人行 相关店铺\n",
      "126204 0  \n",
      "126608 0 叁仟良品 相关店铺\n",
      "126608 0  \n",
      "全球购940 0 瑟令\n",
      "126940 0 \n",
      "127634 0 傻妞一口价 相关店铺\n",
      "127634 0  \n",
      "127693 0 山背后 相关店铺\n",
      "127693 0  \n",
      "127770 3 山东网店 相关店铺\n",
      "127770 3  \n",
      "128453 1 上善若水 相关店铺\n",
      "128453 1  \n",
      "128530 3 尚都比拉 相关店铺\n",
      "128530 3  \n",
      "全球购799 0 奢侈品\n",
      "128799 0 \n",
      "129583 1 生活几何 相关店铺\n",
      "129583 1  \n",
      "全球购082 0 圣罗兰\n",
      "130082 0 \n",
      "130673 2 十月妈咪 相关店铺\n",
      "130673 2  \n",
      "131218 7 食草堂 相关店铺\n",
      "131218 7  \n",
      "131563 1 市舶司 相关店铺\n",
      "131563 1  \n",
      "131577 4 似水年华 相关店铺\n",
      "131577 4  \n",
      "133457 0 舒友阁 相关店铺\n",
      "133457 0  \n",
      "134161 7 双飞燕 相关店铺\n",
      "134161 7  \n",
      "135371 2 水中花 相关店铺\n",
      "135371 2  \n",
      "135744 3 斯莱德 相关店铺\n",
      "135744 3  \n",
      "135858 3 私奔 相关店铺\n",
      "135858 3  \n",
      "135859 0 私奔社 相关店铺\n",
      "135859 0  \n",
      "136107 3 斯莱德 相关店铺\n",
      "136107 3  \n",
      "136172 2 斯斯家 相关店铺\n",
      "136172 2  \n",
      "136362 0 四季出品 相关店铺\n",
      "136362 0  \n",
      "137205 0 素缕 相关店铺\n",
      "137205 0  \n",
      "137682 2 塑唐 相关店铺\n",
      "137682 2  \n",
      "137766 2 🍑酸奶宇宙 yogurtcosmos\n",
      "137766 2 🍑\n",
      "137766 2  \n",
      "137885 0 随意门 相关店铺\n",
      "137885 0  \n",
      "138109 1 索尼爱立信 相关店铺\n",
      "138109 1  \n",
      "138175 3 锁头🔒\n",
      "138175 3 🔒\n",
      "138235 6 她他 相关店铺\n",
      "138235 6  \n",
      "138937 3 太子龙 相关店铺\n",
      "138937 3  \n",
      "139777 0 糖糖大码女装 相关店铺\n",
      "139777 0  \n",
      "139959 1 桃太郎 相关店铺\n",
      "139959 1  \n",
      "141228 2 天美意官方旗舰店 相关店铺\n",
      "141228 2  \n",
      "141444 0 天堂伞官方旗舰店 相关店铺\n",
      "141444 0  \n",
      "141446 4 天堂伞旗舰店 相关店铺\n",
      "141446 4  \n",
      "141573 7 天意 相关店铺\n",
      "141573 7  \n",
      "141696 5 田径精英 相关店铺\n",
      "141696 5  \n",
      "144252 1 脱脂女孩girl🍑\n",
      "144252 1 🍑\n",
      "144253 0 脱脂女孩girl🍑\n",
      "144253 0 🍑\n",
      "144961 0 玩累了的孩子 相关店铺\n",
      "144961 0  \n",
      "145073 8 婉甸 相关店铺\n",
      "145073 8  \n",
      "145163 2 万代官方旗舰店 相关店铺\n",
      "145163 2  \n",
      "145241 3 万里马 相关店铺\n",
      "145241 3  \n",
      "全球购657 0 维多利亚的秘密\n",
      "146657 0 \n",
      "147174 9 味道 相关店铺\n",
      "147174 9  \n",
      "148073 2 沃特 相关店铺\n",
      "148073 2  \n",
      "149895 1 西米露 相关店铺\n",
      "149895 1  \n",
      "149994 3 西西和 相关店铺\n",
      "149994 3  \n",
      "150049 1 西域美农 相关店铺\n",
      "150049 1  \n",
      "150524 3 熙世界 相关店铺\n",
      "150524 3  \n",
      "151216 2 喜得龙 相关店铺\n",
      "151216 2  \n",
      "152524 3 相宜本草官方旗舰店 相关店铺\n",
      "152524 3  \n",
      "全球购732 0 香奈儿\n",
      "152732 0 \n",
      "153487 5 小白熊 相关店铺\n",
      "153487 5  \n",
      "153530 1 小贝壳 相关店铺\n",
      "153530 1  \n",
      "153662 0 小虫米子 相关店铺\n",
      "153662 0  \n",
      "154160 2 小虎宝儿 相关店铺\n",
      "154160 2  \n",
      "154484 6 小龙哈彼 相关店铺\n",
      "154484 6  \n",
      "154561 2 小马过河 相关店铺\n",
      "154561 2  \n",
      "155507 2 小虾米 相关店铺\n",
      "155507 2  \n",
      "155792 0 小怡靓衣 相关店铺\n",
      "155792 0  \n",
      "155811 0 小银子 相关店铺\n",
      "155811 0  \n",
      "155820 1 小优家 相关店铺\n",
      "155820 1  \n",
      "155908 1 小宅女大购物 相关店铺\n",
      "155908 1  \n",
      "155922 4 小镇姗姗 相关店铺\n",
      "155922 4  \n",
      "155947 7 小猪班纳 相关店铺\n",
      "155947 7  \n",
      "155993 0 小资妞 相关店铺\n",
      "155993 0  \n",
      "156739 1 昕薇 相关店铺\n",
      "156739 1  \n",
      "156769 4 新安怡 相关店铺\n",
      "156769 4  \n",
      "156940 0 新光饰品 相关店铺\n",
      "156940 0  \n",
      "156954 1 新华文轩 相关店铺\n",
      "156954 1  \n",
      "157154 0 新农哥 相关店铺\n",
      "157154 0  \n",
      "157931 6 型男 相关店铺\n",
      "157931 6  \n",
      "158801 0 许球球 相关店铺\n",
      "158801 0  \n",
      "160455 7 雅戈尔官方旗舰店 相关店铺\n",
      "160455 7  \n",
      "全球购598 0 雅诗兰黛\n",
      "160598 0 \n",
      "161709 1 燕子家 相关店铺\n",
      "161709 1  \n",
      "162145 0 洋气新店 相关店铺\n",
      "162145 0  \n",
      "163886 5 一诺 相关店铺\n",
      "163886 5  \n",
      "164320 1 伊布都 相关店铺\n",
      "164320 1  \n",
      "164368 1 伊夫黎雪 相关店铺\n",
      "164368 1  \n",
      "164491 2 伊米妮 相关店铺\n",
      "164491 2  \n",
      "164516 3 伊丝艾拉 相关店铺\n",
      "164516 3  \n",
      "164531 1 伊泰莲娜 相关店铺\n",
      "164531 1  \n",
      "164717 5 衣品天成 相关店铺\n",
      "164717 5  \n",
      "164751 2 衣香丽影官方旗舰店 相关店铺\n",
      "164751 2  \n",
      "164920 1 依曼丽官方旗舰店 相关店铺\n",
      "164920 1  \n",
      "165477 4 亦谷 相关店铺\n",
      "165477 4  \n",
      "165765 5 逸红颜 相关店铺\n",
      "165765 5  \n",
      "167468 1 永恒颜色 相关店铺\n",
      "167468 1  \n",
      "167674 5 优贝宜 相关店铺\n",
      "167674 5  \n",
      "167783 6 优美世界 相关店铺\n",
      "167783 6  \n",
      "167877 0 优信电子 相关店铺\n",
      "167877 0  \n",
      "167944 0 优之良品 相关店铺\n",
      "167944 0  \n",
      "168407 0 游卡桌游 相关店铺\n",
      "168407 0  \n",
      "168860 5 于momo 相关店铺\n",
      "168860 5 momo\n",
      "168860 5  \n",
      "169400 0 与狼共舞 相关店铺\n",
      "169400 0  \n",
      "169405 0 与狼共舞 相关店铺\n",
      "169405 0  \n",
      "169853 0 玉兰油 相关店铺\n",
      "169853 0  \n",
      "171586 1 云上生活 相关店铺\n",
      "171586 1  \n",
      "172129 1 早安日记 相关店铺\n",
      "172129 1  \n",
      "172993 3 绽放 相关店铺\n",
      "172993 3  \n",
      "173604 3 掌上明珠 相关店铺\n",
      "173604 3  \n",
      "173709 0 昭贵 相关店铺\n",
      "173709 0  \n",
      "174500 3 真情告白 相关店铺\n",
      "174500 3  \n",
      "175768 4 🔍maputi止汗露\n",
      "175768 4 🔍\n",
      "176316 3 智慧树 相关店铺\n",
      "176316 3  \n",
      "176580 1 中国电信官方旗舰店 相关店铺\n",
      "176580 1  \n",
      "176624 1 中国联通官方旗舰店 相关店铺\n",
      "176624 1  \n",
      "176674 2 中国移动官方旗舰店 相关店铺\n",
      "176674 2  \n",
      "176997 0 中兴官方旗舰店 相关店铺\n",
      "176997 0  \n",
      "177267 2 重回汉唐 相关店铺\n",
      "177267 2  \n",
      "177405 9 周黑鸭 相关店铺\n",
      "177405 9  \n",
      "178983 6 姿美堂 相关店铺\n",
      "178983 6  \n",
      "179602 8 自然卷 相关店铺\n",
      "179602 8  \n",
      "180302 1 最小的海 相关店铺\n",
      "180302 1  \n",
      "180333 4 醉清风 相关店铺\n",
      "180333 4  \n",
      "180365 3 左岸 相关店铺\n",
      "180365 3  \n"
     ]
    }
   ],
   "source": [
    "for index, row in qr1_cn_df.iterrows():\n",
    "    \n",
    "    for i in range(10):\n",
    "        if i < 9:\n",
    "            num = '0' + str(i+1)\n",
    "        else:\n",
    "            num = str(i+1)\n",
    "        qr2 = row['rewrite_' + num]\n",
    "\n",
    "        # 记录第一次重写的查询词\n",
    "        if not pd.isnull(qr2) and qr2 not in qr1_cn_list:\n",
    "            qr2_cn_list.append(qr2)\n",
    "            qr2 = qr2.strip()\n",
    "            print(index, i, qr2)\n",
    "\n",
    "        # 记录重写查询词的分词\n",
    "            cut_words = jieba.cut(qr2)\n",
    "            for word in cut_words:\n",
    "                if word not in keyword_list:\n",
    "                    qr2_segment_cn_list.append(word)\n",
    "                    print(index, i, word)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "59cb143f",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['🍑', 'abercrombie', ' ', 'fitch', '\\r', ' ', 'af', '\\r', 'alexander', ' ']"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qr2_segment_cn_list[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "5c7a7081",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['jew4room🍑',\n",
       " 'abercrombie fitch\\r全球购',\n",
       " 'addidas 相关店铺\\r',\n",
       " 'af\\r全球购',\n",
       " 'alexander mcqueen\\r全球购',\n",
       " 'alexander wang\\r全球购',\n",
       " 'american eagle\\r全球购',\n",
       " 'asos\\r全球购',\n",
       " 'asos 相关店铺\\r',\n",
       " 'aza旗舰店 相关店铺\\r']"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qr2_cn_list[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "ebe1857e",
   "metadata": {},
   "outputs": [],
   "source": [
    "qr2_cn_df = pd.DataFrame({'extend_keywords': qr2_cn_list})\n",
    "qr2_cn_df.to_csv('../datasets/重写查询词3.csv', encoding='utf-8-sig', header=None, index = False)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "f792158e",
   "metadata": {},
   "outputs": [],
   "source": [
    "qr2_segment_cn_df = pd.DataFrame({'extend_keywords': qr2_segment_cn_list})\n",
    "qr2_segment_cn_df.to_csv('../datasets/扩充关键词3_分词.csv', encoding='utf-8-sig', header=None, index = False)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "2fd2ee32",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "598"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(qr2_segment_cn_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "bd8fb037",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "491"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(qr2_cn_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9a816bb6",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
